Skip to content

Conversation

@steinmn
Copy link
Contributor

@steinmn steinmn commented Oct 2, 2025

Proposed change

If the user tries to create a new dashboard with a URL that already exist, the current error message contains technical details and is not translatable (#27162).

This PR uses the translation_key from the updated error message in home-assistant/core#153501 to display an improved translated error message.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@steinmn steinmn force-pushed the fix-tech-details-in-dashboard-panel-url-error branch from 61e6d72 to 4d9f5d6 Compare October 16, 2025 19:23
}
this.closeDialog();
} catch (err: any) {
if (err?.translation_key === "url_already_exists") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not use the translation_key to identify errors, if there is a translation_key we should use the backend provided translation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, any chance I can get a review on the linked backend PR first? Since the proper frontend solution depends on how it ends up being solved in the backend.

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft October 29, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard panel URL error message contains technical details

3 participants